package org.example.types.common;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

/**
 * @author lxc18
 * @date 2025/3/24 11:07
 * @description ResponseCode
 */
@AllArgsConstructor
@NoArgsConstructor
@Getter
public enum ResponseCode {
    SUCCESS("200","success"),
    //USER_PARTICIPATE
    USER_PARTICIPATE_QUERY_REST_QUOTA_FAIL("user_participate_001","user participate rest quota query failed"),
    USER_PARTICIPATE_QUERY_USED_QUOTA_FAIL("user_participate_002","user participate used quota query failed"),
    USER_PARTICIPATE_ADD_REST_QUOTA_FAIL("user_participate_003","user participate add rest quota  failed"),
    USER_PARTICIPATE_QUERY_LOTTERY_RECORD_FAIL("user_participate_004","user participate query lottery record failed"),

    //ACTIVITY_MANAGE
    ACTIVITY_MANAGE_CREATE_ACTIVITY_FAIL("activity_manage_001","activity manage create activity failed"),
    ACTIVITY_MANAGE_UPDATE_ACTIVITY_FAIL("activity_manage_002","activity manage update activity failed"),
    ACTIVITY_MANAGE_DELETE_ACTIVITY_FAIL("activity_manage_003","activity manage delete activity failed"),
    ACTIVITY_MANAGE_QUERY_ACTIVITY_BY_NAME_FAIL("activity_manage_004","activity manage query activity by name failed"),
    ACTIVITY_MANAGE_QUERY_ACTIVITY_BY_ID_FAIL("activity_manage_005","activity manage query activity by id failed"),
    ACTIVITY_MANAGE_QUERY_ACTIVITY_BY_PAGE_FAIL("activity_manage_006","activity manage query activity by page failed"),

    //PRIZE_MANAGE
    PRIZE_MANAGE_CREATE_PRIZE_FAIL("prize_manage_001","prize manage create prize failed"),
    PRIZE_MANAGE_DELETE_PRIZE_FAIL("prize_manage_002","prize manage delete prize failed"),
    PRIZE_MANAGE_UPDATE_PRIZE_FAIL("prize_manage_003","prize manage update prize failed"),
    PRIZE_MANAGE_QUERY_PRIZE_BY_NAME_FAIL("prize_manage_004","prize manage query prize by name failed"),
    PRIZE_MANAGE_QUERY_PRIZE_BY_ID_FAIL("prize_manage_005","prize manage query prize by id failed"),
    PRIZE_MANAGE_QUERY_PRIZE_BY_PAGE_FAIL("prize_manage_006","prize manage query prize by page failed"),
    PRIZE_MANAGE_ADD_PRIZE_STOCK_FAIL("prize_manage_007","prize manage add prize stock failed"),

    //ACTIVITY_STRATEGY_PRIZE
    ACTIVITY_STRATEGY_PRIZE_UPDATE_STRATEGY_FAIL("activity_strategy_prize_001","activity strategy prize update strategy failed"),
    ACTIVITY_STRATEGY_PRIZE_QUERY_STRATEGY_FAIL("activity_strategy_prize_002","activity strategy prize query strategy failed"),
    ACTIVITY_STRATEGY_PRIZE_QUERY_STRATEGY_BY_ACTIVITY_ID_FAIL("activity_strategy_prize_003","activity strategy prize query strategy by activity id failed"),

    //preload
    PRELOAD_PRELOAD_FAIL("preload_001","preload failed"),

    //用户抽奖
    USER_RAFFLE_ACTIVITY_INVALID("user_raffle_001","activity invalid"),
    USER_RAFFLE_QUOTA_NOT_ENOUGH("user_raffle_002","user quota not enough"),
    USER_RAFFLE_RAFFLE_FAIL("user_raffle_003","raffle fail"),
    USER_RAFFLE_NO_PRIZE("user_raffle_004","raffle no prize"),



    //接口限流
    RATE_LIMIT_EXCEEDED("rate_limit_001","rate limit exceeded"),
    //接口降级
    API_DOWNGRADE("downgrade_001","api downgrade")
    ;
    private String code;
    private String info;
}
